package com.webapp.domain.entity;

import javax.persistence.Table;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;

/**
 * 存储自动咨询的消息记录等相关内容
 * @author zern
 *
 */
@Entity
@Table(name = "disputes_message")
public class DisputesMessage {

	private Long id;
	
	private String messages;		// 消息记录
	
	private String caseCause;		// 案由
	
	private String autoSessionId;
	
	private DisputesData disputeData;

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name = "id")
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}


	@OneToOne(fetch = FetchType.LAZY,mappedBy="disputesMessage")

	public DisputesData getDisputeData() {
		return disputeData;
	}
	
	public void setDisputeData(DisputesData disputeData) {
		this.disputeData = disputeData;
	}

	@Column(name = "messages",length = 5000)
	public String getMessages() {
		return messages;
	}

	public void setMessages(String messages) {
		this.messages = messages;
	}

	@Column(name = "case_cause", length=20)
	public String getCaseCause() {
		return caseCause;
	}

	public void setCaseCause(String caseCause) {
		this.caseCause = caseCause;
	}

	@Column(name = "auto_session_id", length = 100)
	public String getAutoSessionId() {
		return autoSessionId;
	}

	public void setAutoSessionId(String autoSessionId) {
		this.autoSessionId = autoSessionId;
	}

}
